﻿using aspNetCURD.Dtos;
using aspNetCURD.Help;
using aspNetCURD.Models;
using AutoMapper;
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
using System;

namespace aspNetCURD.Profiles
{
    public class StudentProfile: Profile
    {
        public StudentProfile()
        {
            CreateMap<StudentCreationDto, Student>()
                .ForMember(
                    dest => dest.sno,
                    opt => opt.MapFrom(src => IdGenerator.GetId())
                );
        }
    }
}
